﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.IO;
using GameServer.Tools;

namespace GameServer.Packet
{
    public class PacketHandler
    {
        private BinaryReader Reader;
        private BinaryWriter Writer;
        private Client Client;

        public PacketHandler(Client c)
        {
            this.Client = c;
        }

        public void StartHandling()
        {
            Reader = new BinaryReader(Client.GetStream());
            Writer = new BinaryWriter(Client.GetStream());

            String inputLine = null;
            StreamReader sr = new StreamReader(Client.GetStream());
            while ((inputLine = sr.ReadLine()) != null)
            {
                Logger.Log(LevelType.INFO, Client.IPAddress + ": " + inputLine);
            }
        }
    }
}
